<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>绘制圆</title>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }
</style>

<body>
    <canvas id="canvas" width="500" height="500"></canvas>
    <script>
        var dom = document.getElementById('canvas'),
            ctx = dom.getContext('2d');
        ctx.fillStyle = "#1cd19c";
        ctx.beginPath();
        ctx.arc(60,60,60,0,Math.PI*2,true);
        ctx.closePath();
        ctx.fill();
    </script>
</body>

</html>